<template>
  <section id="features" class="section features">
    <div class="container">
      <h2 class="section-title">{{ title }}</h2>
      <div class="features-grid">
        <div class="feature-card" v-for="(feature, index) in features" :key="index">
          <h3 class="feature-title">{{ feature.title }}</h3>
          <p class="feature-description">{{ feature.description }}</p>
        </div>
      </div>
    </div>
  </section>
</template>

<script>
export default {
  name: 'FeaturesSection',
  props: {
    title: {
      type: String,
      default: '核心特点'
    },
    features: {
      type: Array,
      default: () => []
    }
  }
}
</script>

<style scoped>
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  font-size: 2.5rem;
  color: #333;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.feature-card {
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  background-color: white;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-title {
  margin-bottom: 15px;
  font-size: 1.5rem;
}
</style>
